home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / utilities / hypercard player / hypercard player 2.4 / home / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1995-03-16  |  6.0 KB  |  26 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>5</cardCount>
  7.     <cardID>4894</cardID>
  8.     <listID>4002</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  17. HyperCard Player Home Stack
  18. Version 2.3
  19.  
  20. ¬©Copyright 1987-1995 by Apple Computer, Inc.
  21. All Rights Reserved.
  22.  
  23. THE MESSAGE HANDLERS USED IN THIS SCRIPT:
  24. startUp,getHomeInfo,resume,nav,disallowInterruption,allowInterruption,
  25. setUserLevelFive,restoreUserLevel,checkForMissingFonts
  26.  
  27. THE FUNCTION HANDLERS USED IN THIS SCRIPT:
  28. lastHCItem,checkHCFont
  29.  
  30. XCMD'S USED BY THIS SCRIPT:
  31. FontExists XFCN
  32. Form: FontExists(<font name>,<point size>)
  33. It returns true if the font/point size is installed or false if not.
  34. ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  35.  
  36. -----  Startup/Resume Scripts:  ---------------------------------------------
  37.  
  38. on startUp
  39. -- Requires handler: getHomeInfo,checkForMissingFonts
  40. -- gets and sets the user's preferences
  41. checkForMissingFonts
  42. getHomeInfo
  43. -- audio Palette startup
  44. if there is a stack "Audio Help" then -- ‚àÜ
  45. start using stack "Audio Help" -- ‚àÜ
  46. send "startSound" to stack "Audio Help" -- ‚àÜ
  47. end if
  48. pass startUp -- so others can use it
  49. end startUp
  50.  
  51. on getHomeInfo
  52. -- Needs: User preferences card of the home stack
  53. -- configures HyperCard to the user specified preferences
  54. global Stacks,Applications,Documents,UserName
  55. if short name of this stack is not "Home" then -- ‚àÜ
  56. lock screen
  57. set lockRecent to true
  58. set lockMessages to true
  59. push this card -- remember where we are
  60. go home -- will take us to the home stack in case we're not there
  61. put false into stackIsHome
  62. else put true into stackIsHome
  63. put (cd fld "User Name" of cd "User Preferences") into UserName
  64. set the userLevel to cd fld "User Level" of cd "User Preferences" -- hidden field
  65. set the powerKeys to hilite of cd btn id 3 of cd "User Preferences" -- Power Keys
  66. set the textArrows to hilite of cd btn id 2 of cd "User Preferences" -- Arrow keys in text
  67. -- load the search path globals
  68. put bg fld "Paths" of cd "Stacks" of bg "Paths" into Stacks
  69. put bg fld "Paths" of cd "Applications" of bg "Paths" into Applications
  70. put bg fld "Paths" of cd "Documents" of bg "Paths" into Documents
  71. if not stackIsHome then
  72. pop card -- return to where we were
  73. set lockRecent to false -- clean up for exit
  74. set lockMessages to false
  75. unlock screen
  76. end if
  77. end getHomeInfo
  78.  
  79. on resume
  80. -- Requires handler: startUp
  81. -- runs startUp handler upon returning
  82. startUp
  83. pass resume -- so others can use it
  84. end resume
  85.  
  86. -----  Utility Scripts  --------------------------------------------
  87.  
  88. on nav  -- ‚àÜ type "nav" into message box
  89. -- Requires XCMD: palette "Navigator"
  90. palette "Navigator"
  91. end nav
  92.  
  93. on disallowInterruption -- so can't stop scripts while running
  94. set cantAbort of this stack to true
  95. end disallowInterruption
  96.  
  97. on allowInterruption -- so can stop scripts while running
  98. set cantAbort of this stack to false
  99. end allowInterruption
  100.  
  101. on setUserLevelFive -- some things need this userLevel
  102. global SvLvl
  103. put the userLevel into SvLvl
  104. set the userLevel to 5
  105. end setUserLevelFive
  106.  
  107. on restoreUserLevel -- use after setUserLevelFive
  108. global SvLvl
  109. if SvLvl is a number then set the userLevel to SvLvl
  110. end restoreUserLevel
  111.  
  112. function lastHCItem delim,theText
  113. -- returns the portion of <theText> that follows the last <delim>
  114. if delim is in theText then
  115. put lastHCItem(delim,char offset(delim,theText) + 1 to ¬¨
  116. length(theText) of theText) into theText
  117. end if
  118. return theText
  119. end lastHCItem
  120.  
  121. -----  Font Adjustment Scripts:  ----------------------------------
  122.  
  123. on checkForMissingFonts
  124. -- Requires handler: checkHCFont
  125. -- check to see if the fonts needed for the stacks are
  126. -- installed in the system. Inform the user if they're not.
  127. get checkHCFont("Courier","9,12") & checkHCFont("Geneva","10,14") & ¬¨
  128. checkHCFont("Palatino","10,12,14,18,24") & ¬¨
  129. checkHCFont("Helvetica","18,24") -- these are fonts needed by this stack
  130. if it is empty then exit checkForMissingFonts
  131. else put it into missingFonts
  132. beep
  133. -- this dialog informs the user which fonts are missing
  134. answer "These font(s) are missing from your system:" & ¬¨
  135. return & return & missingFonts & return & ¬¨
  136. "For text to display correctly in the stacks, make sure you have" ¬¨
  137. && "installed the fonts included with HyperCard." -- ‚àÜ
  138. end checkForMissingFonts
  139.  
  140. function checkHCFont theFont,pointSizes
  141. -- Requires XFCN: FontExists
  142. -- returns a list of font sizes needed but not in the system
  143. put empty into missing
  144. -- steps through each point size passed in
  145. repeat with count = 1 to the number of items in pointSizes
  146. put item count of pointSizes into theCurrentPtSize
  147. if not FontExists(theFont,theCurrentPtSize) -- if can't find it
  148. then put theCurrentPtSize & "," after missing
  149. end repeat
  150. if missing is not empty then
  151. put theFont & space before missing
  152. delete last char of missing
  153. put return after missing
  154. end if
  155. return missing
  156. end checkHCFont
  157. </script>
  158.     <background id="2717" file="background_2717.xml" name="Home Cards" />
  159.     <background id="5834" file="background_5834.xml" name="Preferences" />
  160.     <background id="16078" file="background_16078.xml" name="Paths" />
  161.     <card id="4894" file="card_4894.xml" marked="false" name="Welcome to..." owner="2717" />
  162.     <card id="2376" file="card_2376.xml" marked="false" name="Stacks" owner="16078" />
  163.     <card id="3517" file="card_3517.xml" marked="false" name="Applications" owner="16078" />
  164.     <card id="3090" file="card_3090.xml" marked="false" name="Documents" owner="16078" />
  165.     <card id="4594" file="card_4594.xml" marked="false" name="User Preferences" owner="5834" />
  166. </stack>
  167.